package com.kantboot.api.lbs.repository;

import com.kantboot.api.lbs.domain.vo.ApiLbsAreaHasChildrenVO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ApiLbsAreaHasChildrenVORepository extends JpaRepository<ApiLbsAreaHasChildrenVO, Long> {

    @Query("""
           FROM ApiLbsAreaHasChildrenVO
           WHERE parentAdcode = null OR parentAdcode = ''
           ORDER BY id ASC""")
    List<ApiLbsAreaHasChildrenVO> findAll();

}
